package org.mcflier.appuntamento.data.model.abstracts;

import org.mcflier.appuntamento.data.model.interfaces.IGenre;

public abstract class AbstractGenre implements IGenre {
	
	public AbstractGenre(int id, String name){
		if(name == null)
			throw new NullPointerException("Genre: Genre must not be null");
		if(id<0)
			throw new IllegalArgumentException("Genre: Id must be equal or greater than zero");
		
		this.setId(id);
		this.setName(name);
	}

	@Override
	public abstract int getId();
	
	protected abstract void setId(int id);

	@Override
	public abstract String getName();
	
	protected abstract void setName(String name);
}